package com.scsoft.dataacceptor.server;

import java.util.List;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder;

public class VocStringDecoder extends ByteToMessageDecoder {
	@Override
	protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out)
			throws Exception {
		byte[] msg = new byte[in.readableBytes()];
		in.readBytes(msg);
		out.add(new String(msg));
	}
}
